set nocompatible
filetype off
source $VIMRUNTIME/vimrc_example.vim

"Set the run time path to include Vundle and initialize
set rtp+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin('$HOME/.vim/bundle/')

"let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

"Add all you plugins here(note older version of Vundle used bundle instead of
"plugin
"
Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'naie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'tpope/vim-fugitive'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'Yaggdroot/indentLine'

let python_highlight_all=1

let g:indentLine_char = '|'
let g:indentLine_enabled = 1
let g:autopep8_disable_show_diff = 1

"All of your plugins must be added before teh following line
call vundle#end() "required
filetype plugin indent on "required
set encoding=utf-8
set langmenu=none
set autoindent
set expandtab
set smartindent
set tabstop=4
set shiftwidth=4
set nu
set ruler
set showmatch
set showcmd
set showfulltag
set showmode
set smartcase
set imcmdline
set nowrap
set nobackup
set previewwindow
set nowrap
set guitablabel=%N/\ %t\ %M
set hlsearch
set softtabstop=4
set nobackup
set noswapfile
set noundofile
set ignorecase
set laststatus=2
syntax enable
syntax on
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
colorscheme molokai

if has('gui_running')
    set guioptions-=T "no toolbar
    set columns=108 linespace=0 lines=60
    if has('gui_win32')
        set guifont=DejaVu_Sans_Mono:h10:cANSI
    else
        set guifont=Monospace\ 11
    endif
endif

"mark unnecessary spaces
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
au BufRead,BufNewFile *.bb,*.bbappend,*.bbclass set syn=bitbake
au BufRead,BufNewFile *.do_* set syn=tcsh
au BufRead,BufNewFile *.lds set syn=ld

"set list
"source Session.vim

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      let cmd = '""' . $VIMRUNTIME . '\diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

map g<C-]> :cs find 3 <C-R>=expand(“<cword>”)<CR><CR>
map g<C-/> :cs find 0 <C-R>=expand(“<cword>”)<CR><CR>


source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
